package com.doit.day02


object _01_函数返回值练习 {
  def main(args: Array[String]): Unit = {
    val add1: Int => Int = add _



  }

  //两种返回值类型都补全  :Function2[Dog,Int,Unit]
  //:(Dog,Int)=> Unit
/*  val say: (Dog, Int) => Unit = (dog1: Dog, num: Int) => {
    println(s"我的名字叫${dog1.getName},我的年龄是${dog1.getAge + num}")
  }*/

  val res: ((Int, Int) => Int, Int) => Int = (op: (Int, Int) => Int, num: Int) => {
    op(num, 10) //int
  }

  def add(a:Int)={
    a+10
  }


}
